<a class="btn btn-primary single disabled" onclick="appDataInit()">
	<i class="${strutil.out(button.icon!,'fa fa-anchor')}"></i>
	${button.name}
</a>
<script type="text/javascript">
	var appDataInit = function() {
		var $grid = $('#grid_${object.id}');
		var rows = $grid.bootstrapTable('getSelections');
		var num = rows.length;
		if (num == "0") {
			$.slideMsg("请至少选择一条记录！");
			return;
		}
		var vals = [];
		for (var i = 0; i < rows.length; i++) { //组成一个字符串，ID主键用逗号隔开
			vals.push(rows[i]['id']);
		}
		// 访问后台
		$.ajax({
			url : '/rock/cms/initCmsData/' + vals[0],
			dataType : 'json',
			success : function(data) {
				$.modal.msgSuccess(data.msg);
			}
		});
	};
</script>